﻿using System;
using System.Threading;
using Microsoft.SPOT;
using MFGps;
using MFGps.Devices;
using MFGps.Data;

namespace TestHarness
{
    public class Program
    {
        public static void Main()
        {
            Debug.EnableGCMessages(false);
            IGpsDevice gps = DeviceFactory.GetGpsDevice(GpsDeviceType.MediaTek, "COM1", 9600);
            gps.Connect();
            gps.PositionChanged += gps_PositionChanged;

            Thread.Sleep(Timeout.Infinite);
        }

        static void gps_PositionChanged(DegreeTime latitude, DegreeTime longitude, float altitude, DateTime localTime)
        {
            Debug.Print("Latitude: " + latitude.ToString() + " Longitude: " + longitude.ToString() + " Altitude: " + altitude.ToString());
        }

    }
}
